package com.lostandfound;

import com.lostandfound.interceptor.LoginInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@SpringBootApplication
@ServletComponentScan
@MapperScan("com/lostandfound/mapper")
public class LostAndfoundApplication implements WebMvcConfigurer {

    public static void main(String[] args) {
        SpringApplication.run(LostAndfoundApplication.class, args);
    }

/*    @Autowired
    private LoginInterceptor loginInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(loginInterceptor)
                .addPathPatterns("/**")//需要拦截的资源路径
                .excludePathPatterns("/login*");//不需要拦截的资源路径
    }*/
}
